-
-
Notifications
You must be signed in to change notification settings - Fork 649
Delayed event management: split endpoints, no auth #5066
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: develop
Are you sure you want to change the base?
Conversation
Add dedicated endpoints for each of the cancel/restart/send actions for updating a delayed event, and make them unauthenticated. Also keep support for the original endpoint where the update action is in the request body, and make the split-endpoint versions fall back to it if they are unsupported by the homeserver.
as TypeDoc doesn't support that
| * @throws A M_NOT_FOUND error if no matching delayed event could be found. | ||
| */ | ||
| // eslint-disable-next-line | ||
| public async _unstable_sendScheduledDelayedEvent( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note that the reason these new methods are named "*ScheduledDelayedEvent" is because this method would otherwise be named _unstable_sendDelayedEvent, which would clash with the existing method for the PUT /send/{eventType}/{txnId}?delay={ms} endpoint. "Scheduled" was put in this new method's name avoid that clash, and the cancel/restart method names have it too for the sake of consistency.
Alternatively, the existing _unstable_sendDelayedEvent could be renamed to _unstable_scheduleDelayedEvent, so that "schedule" would mean "prepare an event for delayed delivery" and "send" would mean "immediately send a delayed event now instead of waiting for its scheduled delivery time".
|
Note that this now pulls in matrix-org/matrix-widget-api#143, so that the split/unauthed endpoints are also invoked when using the widget API (meaning they'll be used by embedded Element Call). |
Add dedicated endpoints for each of the cancel/restart/send actions for updating a delayed event, and make them unauthenticated.
Also keep support for the original endpoint where the update action is in the request body, and make the split-endpoint versions fall back to it if they are unsupported by the homeserver.
Checklist
public/exportedsymbols have accurate TSDoc documentation.